import java.util.ArrayList;

import junit.framework.TestCase;

/**
 * 
 */

/**
 * @author Simon
 *
 */
public class CollegeTest extends TestCase
{
	College c =  new College("DCU");
	Faculty f1 = new Faculty();
	Faculty f2 = new Faculty();
	
	
	public void testAddSchool()
	{
		ArrayList<Faculty> list = new ArrayList<Faculty>();
		list.add(f1);
		list.add(f2);
		c.addSchool(f1);
		c.addSchool(f2);
		assertEquals(c.getSchools().size(), list.size());
	}
	
	public void testContains()
	{
		f1.setName("computing");
		f2.setName("nursing");
		c.addSchool(f1);
		c.addSchool(f2);
		assertEquals(c.contains("computing"), true);
	}
	
	public void testReturnFacultyByName()
	{
		f1.setName("computing");
		f2.setName("nursing");
		c.addSchool(f1);
		c.addSchool(f2);
		
		Faculty newf = c.returnFacultyByName("computing");
		assertEquals(newf.equals(f1), true);
		assertEquals(newf.equals(f2),false);
	}
}
